home *** CD-ROM | disk | FTP | other *** search
/ Champak 31 / Volume 31 - JOGO DISK .iso / Games / christmas_attack.swf / scripts / DefineSprite_170_swarm3 / frame_1 / DoAction.as
Text File  |  2007-01-15  |  612b  |  37 lines

  1. adt = _root.lv1.planeArray.length;
  2. _root.lv1.planeArray[adt] = this;
  3. ina = 1;
  4. _X = Math.random() * 440 + 20;
  5. _Y = -42;
  6. gone = 0;
  7. sc = 0;
  8. this.onEnterFrame = function()
  9. {
  10.    if(gone == 0)
  11.    {
  12.       if(_root.pause == 0)
  13.       {
  14.          sc++;
  15.          if(sc == 5)
  16.          {
  17.             en.en.gotoAndStop(2);
  18.          }
  19.          if(_Y < 402)
  20.          {
  21.             _Y = _Y + (Math.random() * 6 + 4);
  22.          }
  23.          else
  24.          {
  25.             gotoAndStop(2);
  26.          }
  27.       }
  28.       xp = _X + en._x;
  29.       yp = _Y + en._y;
  30.    }
  31.    else
  32.    {
  33.       stop();
  34.    }
  35. };
  36. stop();
  37.